package org.ithang.application.currency.service;

import java.util.List;
import java.util.Map;
import org.ithang.application.currency.mapper.CurrencyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.log4j.Logger;
import org.ithang.tools.model.Pager;
import org.ithang.tools.database.ModelDao;
import org.ithang.application.currency.bean.Currency;

/**
 * 币种表 服务
 * @author zyt
 *
 */
@Service
public class CurrencyService extends ModelDao<Currency>{

    @Autowired
    private CurrencyMapper currencyMapper;

    private Logger logger = Logger.getLogger(CurrencyService.class);
    
    public void add(Currency currency){
        currencyMapper.add(currency);
    }
    
    public Currency get(Integer id){
        return currencyMapper.get(id);
    }
    
    public int delete(Integer id){
        return currencyMapper.delete(id);
    }
    
    public int batchDelete(String[] ids){
    	return currencyMapper.batchDelete(ids);
    }
    
    public List<Currency> list(Integer... ids){
    	return currencyMapper.list(ids);
    }
    
    public List<Currency> page(Pager<Currency> page){
    	return currencyMapper.page(page);
    }
    
    public List<Currency> query(Map<String,Object> conditions){
    	return currencyMapper.query(conditions);
    }
    
    public int update(Currency currency){
    	return currencyMapper.update(currency);
    }
    
    
}